package zhongbo.java.air.ingestion.listener;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import zhongbo.java.air.ingestion.dto.FlightPathDto;


@Component
public class RedisChanelPublisher {
    @Autowired
    private RedisTemplate<String, Object> redisTemplate;
    public static String LOG_CHANEL = "log_chanel";
    public static String INJEST_PATH = "injest_flight_path_HYJ";
    public static String FLIGHT_PATH_CHANEL = "flight_path_chanel";

    // 发送消息到频道
    public void broadcast(FlightPathDto message) {
        redisTemplate.convertAndSend(INJEST_PATH, message);
    }
//
}
